package com.abing.decorator.factory;

import com.abing.decorator.AbstractDecorator;
import com.abing.decorator.GatewayComponent;
import com.abing.decorator.imp.BasicComponentGateway;
import com.abing.decorator.imp.LimitDecorator;
import com.abing.decorator.imp.LogDecorator;

public class FactoryGateway {


    public static void main(String[] args) {
        GatewayComponent gatewayComponent=getGatewayComponent();
        gatewayComponent.service();
    }

    private static GatewayComponent getGatewayComponent(){
        return new AbstractDecorator(new LimitDecorator(new LogDecorator(new BasicComponentGateway())));
    }

}
